<?php


namespace app\admin\validate;
use think\Validate;

class Trade extends Validate
{
    protected $rule = [
        'id'=>'require',
        'name'=> 'require|unique:trade',
    ];
    protected $message = [
        'id'=>'传入的ID为空',
        'name' => '大类名字必须填写',
        'name.unique' => "大类名字不能重复",
    ];

    protected $scene = [
        'trade_add' => ["name"],
    ];
}